package com.jsh.erp.datasource.mappers;

import com.jsh.erp.datasource.entities.Project;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ProjectMapperEx {

    List<Project> selectByConditionProject(
            @Param("name") String name,
            @Param("type") String type,
            @Param("phonenum") String phonenum,
            @Param("contacts") String contacts,
            @Param("groupName") String groupName,
            @Param("creatorArray") String[] creatorArray,
            @Param("offset") Integer offset,
            @Param("rows") Integer rows);

    Long countsByProject(
            @Param("name") String name,
            @Param("type") String type,
            @Param("phonenum") String phonenum,
            @Param("contacts") String contacts,
            @Param("groupName") String groupName,
            @Param("creatorArray") String[] creatorArray);

    List<Project> findByAll(
            @Param("name") String name,
            @Param("type") String type,
            @Param("phonenum") String phonenum,
            @Param("contacts") String contacts,
            @Param("groupName") String groupName);

    int batchDeleteProjectByIds(@Param("updateTime") Date updateTime, @Param("updater") Long updater, @Param("ids") String ids[]);

    Project getProjectByNameAndType(
            @Param("name") String name,
            @Param("type") String type);
}